package com.jason.bbs.bean.comment;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Index;
import javax.persistence.Table;

import lombok.Data;

@Data
@Entity
@Table(name = "comment", indexes = { @Index(columnList = "pid"), @Index(columnList = "user_id"),
		@Index(columnList = "article_id") })
public class Comment {
	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	private Integer id;
	@Column(nullable = false)
	private Integer pid;
	@Column(name = "user_id", nullable = false)
	private Integer userId;
	@Column(name = "article_id", nullable = false)
	private Integer articleId;
	@Column(nullable = false, columnDefinition = " mediumtext ")
	private String content;
	@Column(length = 2, nullable = false)
	private Integer status;
	@Column(name = "create_time", nullable = false, columnDefinition = " datetime ")
	private Date createTime;
}
